package scr.main.com.tttshaoqi;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
    @author tttshaoqi
    &#064;create 2025-08-16-14:35
    过滤奇数只留下偶数
*/
public class stream01 {
    public static void main(String[] args) {
        List<Integer> list = List.of(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
        List<Integer> collect = list.stream().filter(x -> x % 2 == 0).collect(Collectors.toList());
        System.out.println(collect);

    }
}
